<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head>
	<th:block th:include="include :: header('新增入库单')"/>
	<th:block th:include="include :: layout-latest-css"/>
	<th:block th:include="include :: ztree-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-stockin-add">
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">物资编号：</label>
						<div class="col-sm-8">
							<input name="productId" placeholder="请输入物资编号" class="form-control"autocomplete="off" type="text" maxlength="30">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">供应商编号：</label>
						<div class="col-sm-8">
							<input name="supplierId" placeholder="请输入供应商编号" class="form-control"autocomplete="off" type="text" maxlength="30">
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">客户编号：</label>
						<div class="col-sm-8">
							<input name="customerId" placeholder="请输入客户编号" class="form-control"autocomplete="off" type="text" maxlength="30"
								   required>
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">当前班组：</label>
						<div class="col-sm-8">
							<input name="classNowId" placeholder="请输入当前班组" autocomplete="off" class="form-control" type="text" maxlength="30">
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">价格：</label>
						<div class="col-sm-8">
							<input name="price" placeholder="请输入价格" class="form-control"autocomplete="off" type="text" maxlength="30">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">批号：</label>
						<div class="col-sm-8">
							<input name="lotNo" placeholder="请输入批号" autocomplete="off" class="form-control" type="text" maxlength="30"
								   required>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">数量：</label>
						<div class="col-sm-8">
							<input name="quantity" placeholder="请输入数量" autocomplete="off" class="form-control" type="text" maxlength="30"
								   required>
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">入库类型：</label>
						<div class="col-sm-8">
							<select name="inType" id="in_type" maxlength="30">
								<option value="1" selected="true">WMS建单入库</option>
								<option value="2">ERP入库</option>
							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">产线编号：</label>
						<div class="col-sm-8">
							<input name="lineId" placeholder="请输入产线编号" autocomplete="off" class="form-control" type="text" maxlength="30">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">仓库名称：</label>
						<div class="col-sm-8">
							<select name="warehouseId" id="warehouseId" maxlength="30">
								<option value="1" selected="true">立体库</option>
							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">实际数量：</label>
						<div class="col-sm-8">
							<input name="assignNum" placeholder="请输入实际数量" autocomplete="off" class="form-control" type="text" maxlength="30">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label is-required">入库来源：</label>
						<div class="col-sm-8">
							<select name="stockinSource" id="stockinSource" maxlength="30">
								<option value="1" selected="true">ERP</option>
								<option value="2" selected="true">OMS</option>
								<option value="2" selected="true">WMS</option>
							</select>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "mydo/stockin"

		function submitHandler() {
			var data = $("#form-stockin-add").serializeArray();
			console.log(data)
			//TODO 如果沒有选择项目组（项目组为空 不允许提交）
			$.operate.save(prefix + "/add", data);
		}
	</script>
</body>
</html>
